<!--头部版块-->
<app-page-header [pageHeaderInfo]="pageHeaderInfo" />

<div class="normal-table-wrap">
  <div nz-row [nzGutter]="[24, 24]">
    <div nz-col [nzLg]="24" [nzMd]="24" [nzSm]="24" [nzXl]="24" [nzXs]="24" [nzXXl]="24">
      <nz-card class="m-b-10" [nzBodyStyle]="{ 'padding-bottom': 0 }">
        <app-water-mark />
        <form nz-form>
          <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24 }">
            <div nz-col [nzLg]="8" [nzMd]="12" [nzSm]="24" [nzXl]="8" [nzXs]="24" [nzXXl]="8">
              <nz-form-item>
                <nz-form-label [nzFor]="">图片名称</nz-form-label>
                <nz-form-control>
                  <input name="imageName" nz-input placeholder="请输入" [(ngModel)]="pageSearchParam.Name" />
                </nz-form-control>
              </nz-form-item>

              <nz-form-item>
                <nz-form-label [nzFor]="">图片内容</nz-form-label>
                <nz-form-control>
                  <nz-select name="imageContent" nz-input placeholder="请选择" [(ngModel)]="pageSearchParam.imageContent">
                    <nz-option nzValue="-1" nzLabel=""></nz-option>
                    <nz-option nzValue="0" nzLabel="空"></nz-option>
                    <nz-option nzValue="1" nzLabel="非空"></nz-option>
                  </nz-select>
                </nz-form-control>
              </nz-form-item>
            </div>

            <div class="m-b-8 text-right p-0" nz-col [nzLg]="8" [nzMd]="12" [nzSm]="24" [nzXl]="8" [nzXs]="24" [nzXXl]="8">
              <button nz-button [nzType]="'primary'" (click)="search()">
                <i nz-icon nzType="search" onkeydown=""></i>
                搜索
              </button>
              <button class="m-l-15" nz-button (click)="resetForm()">
                <i nz-icon nzTheme="outline" nzType="close-circle"></i>
                重置
              </button>
              <a class="collapse operate-text" (click)="toggleCollapse()">
                @if (isCollapse) {
                  <span>展开</span>
                }
                @if (!isCollapse) {
                  <span>收起</span>
                }
                <i nz-icon [nzType]="isCollapse ? 'down' : 'up'"></i>
              </a>
            </div>
          </div>
        </form>
      </nz-card>

      <app-card-table-wrap [tableTitle]="'查询表格'" (reload)="reloadTable()">
        <app-ant-table
          [checkedCashArrayFromComment]="checkedCashArray"
          [tableConfig]="tableConfig"
          [tableData]="scanLogs"
          (changePageNum)="getScanLogs($event)"
          (changePageSize)="changePageSize($event)"
          (selectedChange)="selectedChecked($event)"
          (sortFn)="changeSort($event)"
        ></app-ant-table>
        <ng-template #operationTpl let-id="id" let-imagecontent="imagecontent">
          <!--添加了权限的写法-->
          <!-- <span *appAuth="ActionCode.FireSysSettingDel" class="operate-text" (click)="del(id)">删除</span>-->
          <span class="operate-text" onkeydown="" (click)="previewImage(id)">预览内容</span>
          <span class="operate-text" onkeydown="" (click)="matchResult(id)">匹配</span>
        </ng-template>
      </app-card-table-wrap>
    </div>
  </div>
  <ng-template #highLightTpl let-name="name">
    <nz-badge nzStatus="processing" [nzText]="name"></nz-badge>
  </ng-template>
  <ng-template #availableFlag let-deactivated="deactivated" let-id="id">
    <nz-switch nzCheckedChildren="启用" nzUnCheckedChildren="禁用" [ngModel]="!deactivated" [nzControl]="true" [nzDisabled]="true"></nz-switch>
  </ng-template>
  <ng-template #userAvatar let-imageurl="imageurl" let-id="id">
    <img nz-image style="width: 20px" width="100px" height="200px" [nzSrc]="imageurl" alt="" />
  </ng-template>
</div>
